# 12/17
import pandas as pd
df = pd.read_excel(r"C:\Users\Administrator\Desktop\111.xlsx")
print(df)

# 写文件到excle
a1 = {'name': 'xiaowu','age': 20}
a2 = {'name': 'laoliu','age': 22}
a3 = {'name': 'xiaowang','age': 21}
l = [a1,a2,a3]
print(l)
# 需要将列表变成DataFrame格式
df1 = pd.DataFrame(l)
print(df1)
# 使用pandas的函数to_excle(), index索引
df1.to_excel('222.xlsx', index=False)

#
from docx import Document
docx = Document('2023年国务院政府工作报告.docx')
p = docx.paragraphs
print(p)
print(len(p))
for i in p:
    print(i.text)
